On Visual Studio-style builds, it is likely that we do not have pkg-config
files for libpng, so improve the search for libpng by using CMake's built-in
mechanisms for looking for libpng. This, however, means that we need to use
'png' rather than 'libpng' for the package name to search for.
pixbuf_dep = dependency('gdk-pixbuf-2.0', version: gdk_pixbuf_req,
fallback : ['gdk-pixbuf', 'gdkpixbuf_dep'],
default_options: ['png=enabled', 'jpeg=enabled', 'builtin_loaders=png,jpeg', 'man=false'])
-png_dep = dependency('libpng',
+png_dep = dependency(cc.get_argument_syntax() == 'msvc' ? 'png' : 'libpng',
fallback: ['libpng', 'libpng_dep'],
required: true)
tiff_dep = dependency('libtiff-4',